import java.util.Scanner;

public class FibonacciSequence {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int a = 0;
        int b = 0;
        int number = 0;

        for (int i = 1; i <= n; i++) {
            if (i == 1 || i == 2) {
                number = 1;
            } else if (i == 3) {
                a = 1;
                b = 1;
                number = a + b;
            } else {
                a = b;
                b = number;
                number = a + b;
            }
        }

        System.out.println(number);
    }
}
